import request from "@/utils/request";
import type { OperationLogQuery, OperationLogVo } from "./types";
import type { AxiosPromise } from "axios";

// 查询操作日志列表
export function list(query: OperationLogQuery): AxiosPromise<OperationLogVo[]> {
  return request({
    url: "/system/operationLog/list",
    method: "get",
    params: query
  });
}

// 删除操作日志
export function delOperationInfo(operationId: string | number | Array<string | number>) {
  return request({
    url: "/system/operationLog/" + operationId,
    method: "delete"
  });
}

// 获取操作日志
export function getOperationInfo(operationId: string | number) {
  return request({
    url: "/system/operationLog/" + operationId,
    method: "get"
  });
}
